<!DOCTYPE html>
<html lang="zh-Hans">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 3.8.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"yoursite.com","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="A Quiet Departure.">
<meta property="og:type" content="website">
<meta property="og:title" content="Feng&#39;s Blog">
<meta property="og:url" content="http://yoursite.com/page/16/index.html">
<meta property="og:site_name" content="Feng&#39;s Blog">
<meta property="og:description" content="A Quiet Departure.">
<meta property="og:locale" content="zh-Hans">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Feng&#39;s Blog">
<meta name="twitter:description" content="A Quiet Departure.">

<link rel="canonical" href="http://yoursite.com/page/16/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : true,
    isPost : false,
    lang   : 'zh-Hans'
  };
</script>

  <title>Feng's Blog</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Feng's Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>Home</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>About</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>Tags</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>Categories</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>Archives</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content index posts-expand">
            
      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-Hans">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2019/03/07/vim的使用技巧/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="Fengorz">
      <meta itemprop="description" content="A Quiet Departure.">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Feng's Blog">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2019/03/07/vim的使用技巧/" class="post-title-link" itemprop="url">vim的使用技巧</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2019-03-07 22:33:05" itemprop="dateCreated datePublished" datetime="2019-03-07T22:33:05+08:00">2019-03-07</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-05-21 23:50:52" itemprop="dateModified" datetime="2020-05-21T23:50:52+08:00">2020-05-21</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/vim/" itemprop="url" rel="index"><span itemprop="name">vim</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="TodoItem"><a href="#TodoItem" class="headerlink" title="TodoItem"></a>TodoItem</h1><h2 id="异常情况处理-todo"><a href="#异常情况处理-todo" class="headerlink" title="异常情况处理 todo"></a>异常情况处理 todo</h2><p>W10: Warning: Changing a readonly file</p>
<h1 id="Basic-Knowledge"><a href="#Basic-Knowledge" class="headerlink" title="Basic Knowledge"></a>Basic Knowledge</h1><h2 id="Hotkeys-In-Normal-Mode"><a href="#Hotkeys-In-Normal-Mode" class="headerlink" title="Hotkeys In Normal Mode"></a>Hotkeys In Normal Mode</h2><h4 id="Moving-移动"><a href="#Moving-移动" class="headerlink" title="Moving(移动)"></a>Moving(移动)</h4><table>
<thead>
<tr>
<th>key</th>
<th>desc</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>移动到行首</td>
</tr>
<tr>
<td>$</td>
<td>移动到行尾</td>
</tr>
<tr>
<td>G</td>
<td>移动到最后一行</td>
</tr>
<tr>
<td>1G</td>
<td>移动到第一行</td>
</tr>
<tr>
<td>dG</td>
<td>从当前行删除到最后一行</td>
</tr>
<tr>
<td>v+hjkl</td>
<td>从当前位置开始移动并选中</td>
</tr>
<tr>
<td>V+jk</td>
<td>从当前行开始移动并选中</td>
</tr>
<tr>
<td>shift+<or shift+></or></td>
<td>选择之后可以在命令行模式将代码进行左右移动。</td>
</tr>
</tbody>
</table>
<h4 id="Editing-编辑"><a href="#Editing-编辑" class="headerlink" title="Editing(编辑)"></a>Editing(编辑)</h4><table>
<thead>
<tr>
<th>key</th>
<th>desc</th>
</tr>
</thead>
<tbody>
<tr>
<td>dd</td>
<td>删除当前行</td>
</tr>
<tr>
<td>d1G</td>
<td>从当前行删除到第一行</td>
</tr>
<tr>
<td>Ndd</td>
<td>删除光标以下的N行</td>
</tr>
<tr>
<td>d$</td>
<td>删除光标所在到行尾</td>
</tr>
<tr>
<td>d0</td>
<td>删除光标所在到行首</td>
</tr>
<tr>
<td>daw</td>
<td>删除光标所在单词</td>
</tr>
</tbody>
</table>
<h4 id="View-视图"><a href="#View-视图" class="headerlink" title="View(视图)"></a>View(视图)</h4><table>
<thead>
<tr>
<th>key</th>
<th>desc</th>
</tr>
</thead>
<tbody>
<tr>
<td>^+w s</td>
<td>上下分割当前打开的文件。</td>
</tr>
<tr>
<td>^+w v</td>
<td>左右分割当前打开的文件。</td>
</tr>
<tr>
<td>^+w (h,l,j,k)</td>
<td>移动光标到不同的分屏。</td>
</tr>
<tr>
<td>^+w c</td>
<td>关闭当前窗口。</td>
</tr>
</tbody>
</table>
<h2 id="Commands-In-command-Mode"><a href="#Commands-In-command-Mode" class="headerlink" title="Commands In command Mode"></a>Commands In command Mode</h2><h4 id="search-搜索"><a href="#search-搜索" class="headerlink" title="search(搜索)"></a>search(搜索)</h4><table>
<thead>
<tr>
<th>command</th>
<th>desc</th>
</tr>
</thead>
<tbody>
<tr>
<td>:/ or ?</td>
<td>命令行模式输入要搜索的字符串,查看下一个匹配按n,查看上一个匹配按N</td>
</tr>
</tbody>
</table>
<h4 id="Moving-移动-1"><a href="#Moving-移动-1" class="headerlink" title="Moving(移动)"></a>Moving(移动)</h4><table>
<thead>
<tr>
<th>command</th>
<th>desc</th>
</tr>
</thead>
<tbody>
<tr>
<td>:1000</td>
<td>快速移动到第1000行，在命令行模式下</td>
</tr>
<tr>
<td>:m+</td>
<td>将当前行向下移动</td>
</tr>
<tr>
<td>:m+n</td>
<td>将当前行向下移动n行,最后一行使用$</td>
</tr>
<tr>
<td>:m-</td>
<td>将当前行向上移动</td>
</tr>
<tr>
<td>:m-n</td>
<td>将当前行向上移动n行,第一行使用0</td>
</tr>
<tr>
<td>:$</td>
<td>跳到文件最后一行</td>
</tr>
<tr>
<td>:0</td>
<td>跳到文件第一行</td>
</tr>
</tbody>
</table>
<h2 id="批量替换"><a href="#批量替换" class="headerlink" title="批量替换"></a>批量替换</h2><p><a href="http://blog.chinaunix.net/uid-23802873-id-2658259.html" target="_blank" rel="noopener">http://blog.chinaunix.net/uid-23802873-id-2658259.html</a></p>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-Hans">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/05/01/CSS备忘录/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="Fengorz">
      <meta itemprop="description" content="A Quiet Departure.">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Feng's Blog">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2020/05/01/CSS备忘录/" class="post-title-link" itemprop="url">CSS备忘录</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2020-05-01 21:53:23" itemprop="dateCreated datePublished" datetime="2020-05-01T21:53:23+08:00">2020-05-01</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-05-19 16:04:55" itemprop="dateModified" datetime="2020-05-19T16:04:55+08:00">2020-05-19</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/CSS/" itemprop="url" rel="index"><span itemprop="name">CSS</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h2 id="固定在div的右下角"><a href="#固定在div的右下角" class="headerlink" title="固定在div的右下角"></a>固定在div的右下角</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">position:absolute;</span><br><span class="line">right:5px;</span><br><span class="line">bottom:5px;</span><br></pre></td></tr></table></figure>
<h2 id="下外边框距离（和底部的div拉开距离）"><a href="#下外边框距离（和底部的div拉开距离）" class="headerlink" title="下外边框距离（和底部的div拉开距离）"></a>下外边框距离（和底部的div拉开距离）</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">margin-bottom: 10px</span><br></pre></td></tr></table></figure>
<h2 id="靠边"><a href="#靠边" class="headerlink" title="靠边"></a>靠边</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">.pull-right &#123;</span><br><span class="line">  float: right !important;</span><br><span class="line">&#125;</span><br><span class="line">.pull-left &#123;</span><br><span class="line">  float: left !important;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="字体加粗"><a href="#字体加粗" class="headerlink" title="字体加粗"></a>字体加粗</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">&lt;b&gt;&lt;/b&gt;</span><br><span class="line">&lt;strong&gt;&lt;/strong&gt;</span><br></pre></td></tr></table></figure>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-Hans">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/04/06/正则表达式汇总/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="Fengorz">
      <meta itemprop="description" content="A Quiet Departure.">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Feng's Blog">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2020/04/06/正则表达式汇总/" class="post-title-link" itemprop="url">正则表达式汇总</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2020-04-06 15:58:44" itemprop="dateCreated datePublished" datetime="2020-04-06T15:58:44+08:00">2020-04-06</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-05-18 14:21:27" itemprop="dateModified" datetime="2020-05-18T14:21:27+08:00">2020-05-18</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/正则表达式/" itemprop="url" rel="index"><span itemprop="name">正则表达式</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <blockquote>
<p>有时候需要通过正则表达式来快速匹配某些字符串筛选结果，但是规则老是忘了，所以记录一下，以便日后使用。</p>
</blockquote>
<h1 id="Basic-Knowledge"><a href="#Basic-Knowledge" class="headerlink" title="Basic Knowledge"></a>Basic Knowledge</h1><h2 id="行首和行尾"><a href="#行首和行尾" class="headerlink" title="行首和行尾"></a>行首和行尾</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">^cat : 验证该行以c开头紧接着是a，然后是t</span><br><span class="line">cat$ : 验证该行以t结尾倒数第二个字符为a倒数第三个字符为c</span><br><span class="line">^cat$: 以c开头接着是a-&gt;t然后是行结束：只有cat三个字母的数据行</span><br><span class="line">^$  : 开头之后马上结束：空白行，不包括任何字符</span><br></pre></td></tr></table></figure>
<p>匹配以- 开头的任何字符串，到以#开头的行：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">^- .*$</span><br><span class="line">^#.*</span><br></pre></td></tr></table></figure></p>
<h2 id="匹配包含某个字符串的行"><a href="#匹配包含某个字符串的行" class="headerlink" title="匹配包含某个字符串的行"></a>匹配包含某个字符串的行</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">^(.*)string(.*)\n</span><br></pre></td></tr></table></figure>
<p>string为指定的字符串</p>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-Hans">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2019/10/15/iTerm2汇总/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="Fengorz">
      <meta itemprop="description" content="A Quiet Departure.">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Feng's Blog">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2019/10/15/iTerm2汇总/" class="post-title-link" itemprop="url">iTerm2汇总</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2019-10-15 21:18:52" itemprop="dateCreated datePublished" datetime="2019-10-15T21:18:52+08:00">2019-10-15</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-05-17 23:36:53" itemprop="dateModified" datetime="2020-05-17T23:36:53+08:00">2020-05-17</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/iTerm2/" itemprop="url" rel="index"><span itemprop="name">iTerm2</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="TodoItem"><a href="#TodoItem" class="headerlink" title="TodoItem"></a>TodoItem</h1><h2 id="iterm2-ranger强大的终端文件管理器-todo"><a href="#iterm2-ranger强大的终端文件管理器-todo" class="headerlink" title="iterm2+ranger强大的终端文件管理器 todo"></a>iterm2+ranger强大的终端文件管理器 todo</h2><h1 id="Basic-Knowledge"><a href="#Basic-Knowledge" class="headerlink" title="Basic Knowledge"></a>Basic Knowledge</h1><h2 id="HotKey"><a href="#HotKey" class="headerlink" title="HotKey"></a>HotKey</h2><p>按方向切换 pane：⌘+Option+方向键<br>切分屏幕：⌘+d 水平切分，⌘+Shift+d 垂直切分<br>智能查找，支持正则查找：⌘+f<br>自动查找历史命令: ⌘+;<br>ctrl+r 搜索历史命令<br>查看剪贴板历史: cmd+shift+h</p>
<h2 id="keymap"><a href="#keymap" class="headerlink" title="keymap"></a>keymap</h2><p>新建标签：command + t</p>
<p>关闭标签：command + w</p>
<p>切换标签：command + 数字 command + 左右方向键</p>
<p>切换全屏：command + enter</p>
<p>查找：command + f</p>
<p>垂直分屏：command + d</p>
<p>水平分屏：command + shift + d</p>
<p>切换屏幕：command + option + 方向键 command + [ 或 command + ]</p>
<p>查看历史命令：command + ;</p>
<p>查看剪贴板历史：command + shift + h</p>
<p>清除当前行：ctrl + u</p>
<p>到行首：ctrl + a</p>
<p>到行尾：ctrl + e</p>
<p>前进后退：ctrl + f/b (相当于左右方向键)</p>
<p>上一条命令：ctrl + p</p>
<p>搜索命令历史：ctrl + r</p>
<p>删除当前光标的字符：ctrl + d</p>
<p>删除光标之前的字符：ctrl + h</p>
<p>删除光标之前的单词：ctrl + w</p>
<p>删除到文本末尾：ctrl + k</p>
<p>交换光标处文本：ctrl + t</p>
<p>清屏1：command + r</p>
<p>清屏2：ctrl + l</p>
<p>自带有哪些很实用的功能/快捷键</p>
<p>⌘ + 数字在各 tab 标签直接来回切换</p>
<p>选择即复制 + 鼠标中键粘贴，这个很实用</p>
<p>⌘ + f 所查找的内容会被自动复制</p>
<p>⌘ + d 横着分屏 / ⌘ + shift + d 竖着分屏</p>
<p>⌘ + r = clear，而且只是换到新一屏，不会想 clear 一样创建一个空屏</p>
<p>ctrl + u 清空当前行，无论光标在什么位置</p>
<p>输入开头命令后 按 ⌘ + ; 会自动列出输入过的命令</p>
<h1 id="oh-my-zsh"><a href="#oh-my-zsh" class="headerlink" title="oh-my-zsh"></a>oh-my-zsh</h1><h2 id="好看清晰的主题"><a href="#好看清晰的主题" class="headerlink" title="好看清晰的主题"></a>好看清晰的主题</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">af-magic.zsh-theme</span><br></pre></td></tr></table></figure>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-Hans">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2019/10/28/RabbitMQ汇总/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="Fengorz">
      <meta itemprop="description" content="A Quiet Departure.">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Feng's Blog">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2019/10/28/RabbitMQ汇总/" class="post-title-link" itemprop="url">RabbitMQ汇总</a>
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2019-10-28 09:53:25" itemprop="dateCreated datePublished" datetime="2019-10-28T09:53:25+08:00">2019-10-28</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-05-17 19:59:35" itemprop="dateModified" datetime="2020-05-17T19:59:35+08:00">2020-05-17</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/rabbitmq/" itemprop="url" rel="index"><span itemprop="name">rabbitmq</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
          <h1 id="BASIC-KNOWLEDGE"><a href="#BASIC-KNOWLEDGE" class="headerlink" title="BASIC KNOWLEDGE"></a>BASIC KNOWLEDGE</h1><h2 id="网上的基础教程"><a href="#网上的基础教程" class="headerlink" title="网上的基础教程"></a>网上的基础教程</h2><p><a href="https://blog.csdn.net/hellozpc/article/details/81436980" target="_blank" rel="noopener">https://blog.csdn.net/hellozpc/article/details/81436980</a></p>
<h2 id="两个消息分发机制"><a href="#两个消息分发机制" class="headerlink" title="两个消息分发机制"></a>两个消息分发机制</h2><ul>
<li>Round-robin dispatch（轮训分发）</li>
<li>Fair dispatch（公平分发）</li>
</ul>
<h2 id="开启Browser后台界面管理插件"><a href="#开启Browser后台界面管理插件" class="headerlink" title="开启Browser后台界面管理插件"></a>开启Browser后台界面管理插件</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">docker pull rabbitmq:management</span><br><span class="line">docker run -d --hostname my-rabbit --name some-rabbit -p 15555:15672 rabbitmq:management</span><br></pre></td></tr></table></figure>
<p>15555端口可以自定义</p>
<h1 id="PROBLEM-SOLUTION"><a href="#PROBLEM-SOLUTION" class="headerlink" title="PROBLEM SOLUTION"></a>PROBLEM SOLUTION</h1><h2 id="guest取消本地登录限制"><a href="#guest取消本地登录限制" class="headerlink" title="guest取消本地登录限制"></a>guest取消本地登录限制</h2><p><a href="https://blog.csdn.net/shenhonglei1234/article/details/82745601" target="_blank" rel="noopener">https://blog.csdn.net/shenhonglei1234/article/details/82745601</a></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">## 注意对应版本</span><br><span class="line">vi /usr/lib/rabbitmq/lib/rabbitmq_server-3.7.7/ebin/rabbit.app</span><br><span class="line"></span><br><span class="line">将：&#123;loopback_users, [&lt;&lt;”guest”&gt;&gt;]&#125;，</span><br><span class="line">改为：&#123;loopback_users, []&#125;，</span><br><span class="line">原因：rabbitmq从3.3.0开始禁止使用guest/guest权限通过除localhost外的访问</span><br><span class="line"></span><br><span class="line">service rabbitmq-server restart</span><br></pre></td></tr></table></figure>
<h2 id="org-springframework-amqp-AmqpConnectException-java-net-ConnectException-Connection-refused-Connection-refused"><a href="#org-springframework-amqp-AmqpConnectException-java-net-ConnectException-Connection-refused-Connection-refused" class="headerlink" title="org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)"></a>org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused (Connection refused)</h2><p>默认基于tcp的连接端口是5672，详情可见rabbit.app配置文件里面的<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&#123;tcp_listeners, [5672]&#125;</span><br></pre></td></tr></table></figure></p>
<p>还要注意防火墙是否屏蔽端口。</p>
<h2 id="cannot-deserialize-from-Object-value-no-delegate-or-property-based-Creator"><a href="#cannot-deserialize-from-Object-value-no-delegate-or-property-based-Creator" class="headerlink" title="cannot deserialize from Object value (no delegate- or property-based Creator)"></a>cannot deserialize from Object value (no delegate- or property-based Creator)</h2><p>不小心在POJO加了lombok的@AllArgsConstructor注解，这个方法会私有化无参构造器，导致序列化失败。</p>
<h2 id="How-to-delete-all-messages-from-a-Queue"><a href="#How-to-delete-all-messages-from-a-Queue" class="headerlink" title="How to delete all messages from a Queue"></a>How to delete all messages from a Queue</h2><p><a href="https://www.cloudamqp.com/blog/2016-06-14_how_to_delete_all_messages_in_a_queue.html#mgmt_interface" target="_blank" rel="noopener">https://www.cloudamqp.com/blog/2016-06-14_how_to_delete_all_messages_in_a_queue.html#mgmt_interface</a></p>

      
    </div>

    
    
    
      <footer class="post-footer">
        <div class="post-eof"></div>
      </footer>
  </article>
  
  
  


  
  <nav class="pagination">
    <a class="extend prev" rel="prev" href="/page/15/"><i class="fa fa-angle-left" aria-label="Previous page"></i></a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/15/">15</a><span class="page-number current">16</span><a class="page-number" href="/page/17/">17</a><span class="space">&hellip;</span><a class="page-number" href="/page/25/">25</a><a class="extend next" rel="next" href="/page/17/"><i class="fa fa-angle-right" aria-label="Next page"></i></a>
  </nav>



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">Fengorz</p>
  <div class="site-description" itemprop="description">A Quiet Departure.</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">125</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">68</span>
        <span class="site-state-item-name">categories</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">87</span>
        <span class="site-state-item-name">tags</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Fengorz</span>
</div>
  <div class="powered-by">Powered by <a href="https://hexo.io" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a>
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>
<script src="/js/utils.js"></script><script src="/js/motion.js"></script>
<script src="/js/schemes/pisces.js"></script>
<script src="/js/next-boot.js"></script>



  















  

  

</body>
</html>
